package com.wjb.xietong.server.myTask;

import java.util.HashMap;
import java.util.Map;

import com.wjb.xietong.server.IRequestParam;
import com.wjb.xietong.util.IDs;

public class MyTaskParam implements IRequestParam {
	private long companyId = 0l;
	private int deleteFlag = 0; // (1:已删除 )
	private int operationStatus = -1;// (-1:如果deleteFlag设置为1则为默认值该项不填 0:未完成
										// 1：已完成)
	private int pageIndex = 0;
	private int pageSize = 0;
	private long projectId = -1;// (-1:为查询本用户任务列表)
	private long userId = 0l;

	@Override
	public Map<String, String> parseData2Map() {
		Map<String, String> map = new HashMap<String, String>();
		put(map, IDs.M, IDs.MOBILE_MY_TASK);
		put(map, IDs.COM_ID, getCompanyId());
		put(map, IDs.DELETE_FLAG, getDeleteFlag());
		put(map, IDs.OPERATION_STATU, getOperationStatus());
		put(map, IDs.PAGE_INDEX, getPageIndex());
		put(map, IDs.PAGE_SIZE, getPageSize());
		put(map, IDs.PROJECT_ID, getProjectId());
		put(map, IDs.USER_ID, getUserId());
		return map;
	}

	private void put(Map<String, String> map, String key, long value) {
		put(map, key, String.valueOf(value));
	}

	private void put(Map<String, String> map, String key, int value) {
		put(map, key, String.valueOf(value));
	}

	private void put(Map<String, String> map, String key, String value) {
		if (null == key || null == value) {
			return;
		}
		map.put(key, value);
	}

	public long getCompanyId() {
		return companyId;
	}

	public void setCompanyId(long companyId) {
		this.companyId = companyId;
	}

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public int getOperationStatus() {
		return operationStatus;
	}

	public void setOperationStatus(int operationStatus) {
		this.operationStatus = operationStatus;
	}

	public int getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public long getProjectId() {
		return projectId;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

}
